.list {
  width: 300px;
  border: 1px solid black;
  margin: 0 auto;
  list-style: none;
  padding: 0;
  text-align: center;
}
.list li {
  height: 30px;
  line-height: 30px;
  border: 1px solid pink;
}
.list li:nth-child(2n-1) {
  background: yellow;
}
.list li:nth-child(2n) {
  background: purple;
}
.list li:hover {
  background: blue;
  color: #FFF;
}
